
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemStoreRequest struct {

	Name string `json:"name" form:"name"`

	Introduction string `json:"introduction" form:"introduction"`

	Phone string `json:"phone" form:"phone"`

	Address string `json:"address" form:"address"`

	DetailedAddress string `json:"detailed_address" form:"detailed_address"`

	Image string `json:"image" form:"image"`

	OblongImage string `json:"oblong_image" form:"oblong_image"`

	Latitude string `json:"latitude" form:"latitude"`

	Longitude string `json:"longitude" form:"longitude"`

	ValidTime string `json:"valid_time" form:"valid_time"`

	DayTime string `json:"day_time" form:"day_time"`

	AddTime string `json:"add_time" form:"add_time"`

	IsShow string `json:"is_show" form:"is_show"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *SystemStoreRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemStoreRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"name": "required",

		"introduction": "required",

		"phone": "required",

		"address": "required",

		"detailed_address": "required",

		"image": "required",

		"oblong_image": "required",

		"latitude": "required",

		"longitude": "required",

		"valid_time": "required",

		"day_time": "required",

		"add_time": "required",

		"is_show": "required",

		"is_del": "required",

	}
}

func (r *SystemStoreRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemStoreRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemStoreRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
